package hiq.optics.transf;

import hiq.math.complex.Complex;
import hiq.optics.common.Scalar2DProblem;

/**
 * This class does Fresnel transformation of given object
 * @author 829
 *
 */
public class FresnelTransformation extends Scalar2DProblem{

	@Override
	public void setParameters() {
		wavelength = 1.55e-6; // m
		z = 10 * wavelength;
		L = 50;
		xsize_ = 5 * wavelength;
		ysize_ = 5 * wavelength;
	}

	@Override
	public void init() {
		ds = wavelength / L;
		xsize = fl(xsize_);
		ysize = fl(ysize_);
		U0 = new double [xsize][ysize];
		U  = new Complex [xsize][ysize];
	}
	
	public void setObject(){
		
		int a1 = fl(xsize_ / 4);
		int a2 = fl(3 * xsize_ / 4);
		int b1 = fl(ysize_ / 4);
		int b2 = fl(3 * ysize_ / 4);
		
		for (int i = a1; i< a2; i++){
			for (int j = b1; j<b2; j++){
				U0[i][j] = 1;
			}
		}
	}

	@Override
	public void run() {
		
	}

	
}